import React from 'react';
import { Spin } from 'antd';

export default class PageLoadingSpin extends React.Component {
    constructor(props) {
		super(props);
		this.state = {
            display: false,
        };
	}

    render() {
			const { display } = this.props;
			let showLoading = display ? 'block' : 'none';
			return (
				<div style={{ position: 'absolute',
height: '100%',
width: '100%',
top: 0,
left: 0,
textAlign: 'center',
display: showLoading,
					backgroundColor: '#fff',
opacity: '.5',
zIndex: 1000,
msFilter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=50)' }}
				>
									<div style={{ position: 'relative', height: '100%', textAlign: 'center', top: '45%' }}>
										<Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@wjj489`} />
								</div>
							</div>
					);
    }
}
